#!/usr/bin/env python3
# -*- coding:utf-8 -*-
###
# File: student.py
# -----
# Description:
# -----
# Created  By: Aim 2020-01-31 21:27:50
# Modified By: Aim 2020-01-31 21:48:53
# -----
# HISTORY:
# Date      	By	Comments
# ----------	---	----------------------------------------------------------
###


class Student(object):

    def __init__(self, name, score):
        self.__name = name
        self.__score = score

    def print_score(self):
        print('%s: %s' % (self.__name, self.__score))

    def get_grade(self):
        if self.__score >= 90:
            return 'A'
        elif self.__score >= 60:
            return 'B'
        else:
            return 'C'

    def get_name(self):
        return self.__name

    def get_score(self):
        return self.__score

    def set_name(self, name):
        self.__name = name

    def set_score(self, score):
        if 0 <= score <= 100:
            self.__score = score
        else:
            raise ValueError('bad score')


bart = Student('Bart Simpson', 59)
bart.print_score()
print(bart.get_grade())
